<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <base th:href="${#request.getContextPath() + '/webcon/resources/'}"/>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>INSPINIA | Dashboard</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">

    <!-- Toastr style -->
    <link href="css/plugins/toastr/toastr.min.css" rel="stylesheet">

    <!-- Gritter -->
    <link href="js/plugins/gritter/jquery.gritter.css" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <!-- Mainly scripts -->
    <script src="js/jquery-2.1.1.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

    <!-- Flot -->
    <script src="js/plugins/flot/jquery.flot.js"></script>
    <script src="js/plugins/flot/jquery.flot.tooltip.min.js"></script>
    <script src="js/plugins/flot/jquery.flot.spline.js"></script>
    <script src="js/plugins/flot/jquery.flot.resize.js"></script>
    <script src="js/plugins/flot/jquery.flot.pie.js"></script>

    <!-- Peity -->
    <script src="js/plugins/peity/jquery.peity.min.js"></script>
    <script src="js/demo/peity-demo.js"></script>

    <!-- Custom and plugin javascript -->
    <script src="js/inspinia.js"></script>
    <script src="js/plugins/pace/pace.min.js"></script>

    <!-- jQuery UI -->
    <script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>

    <!-- GITTER -->
    <script src="js/plugins/gritter/jquery.gritter.min.js"></script>

    <!-- Sparkline -->
    <script src="js/plugins/sparkline/jquery.sparkline.min.js"></script>

    <!-- Sparkline demo data  -->
    <script src="js/demo/sparkline-demo.js"></script>

    <!-- ChartJS-->
    <script src="js/plugins/chartJs/Chart.min.js"></script>

    <!-- Toastr -->
    <script src="js/plugins/toastr/toastr.min.js"></script>

    <!-- websocket
    <script src="js/websocket.js"></script>-->

    <!-- 自动设置内容高度
      //动态计算高度
      autoHeight(function(h){
           alert("高度：" + h);
           $(".right_content").css("height", h + "px");
      });
     -->
    <script src="js/content_height.js"></script>

   <!-- <script src="myjs/taskstatus.js"></script>-->

    <script type="text/javascript" th:src="${#request.getContextPath() + '/commons/js/myajax.js'}"></script>
    <script type="text/javascript" th:src="${#request.getContextPath() + '/commons/js/myztree.js'}"></script>
    <script type="text/javascript" th:src="${#request.getContextPath() + '/commons/js/mydialog.js'}"></script>
    <script type="text/javascript" th:src="${#request.getContextPath() + '/commons/js/mytask_status.js'}"></script>


    <script type="text/javascript" th:inline="javascript">

        var gloabStatus = false;

        $(function () {
            //预加载初始化页面
            $.get([[${#request.getContextPath()}]] + "/client/listByWebcon", function(data) {
                $("#iframe").html(data);
            });

            //设置点击事件
            $("a[target]").click(function () {
                //取消被点击的样式
                $("li").removeClass("active");
                //设置被点击的样式
                $(this).parents("li").addClass("active");
                //设置标题
                $("#title_span").html($(this).html());

                var page = $(this).attr("target");
                //预加载初始化页面
                $.get([[${#request.getContextPath()}]] + page, function (data) {
                    $("#iframe").html(data);
                });
            });
        });
    </script>

</head>

<body>
<div id="wrapper">
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav metismenu" id="side-menu">
                <li class="nav-header">
                    <div class="dropdown profile-element">
                        <span>
                        <!--  TODO Logo
                            <img alt="image" src="icon/logo.png"/>-->
                        </span>
                        <!-- 缩放按钮 -->
                        <a data-toggle="dropdown" class="dropdown-toggle" href="index.html#">
                            <span class="clear"> <span class="block m-t-xs">
                                <strong class="font-bold" th:text="${#session.getAttribute(T(com.video.commons.loginaop.LoginContact).WEBCON_USER.getKey()).getNickname()}">David Williams</strong>
                            </span>
                                <!--<span class="text-muted text-xs block">
                                    个人中心
                                    <b class="caret"></b>
                                </span>-->
                            </span>
                        </a>
                        <!--<ul class="dropdown-menu animated fadeInRight m-t-xs">
                            <li>
                                <a href="profile.html">修改密码</a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a th:href="${#request.getContextPath() + '/web/account/logout'}">注销</a>
                            </li>
                        </ul>-->
                    </div>
                    <div class="logo-element">
                        Video
                    </div>
                </li>

                <!-- TODO 左侧菜单项 - begin -->

                <!-- 终端状态 -->
                <li class="active">
                    <a>
                        <i class="fa fa-laptop"></i>
                        <span class="nav-label">终端管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li class="active">
                            <a target="/client/listByWebcon">终端状态</a>
                        </li>
                    </ul>
                </li>

                <!-- 音乐系统 -->
                <li>
                    <a>
                        <i class="fa fa-music"></i>
                        <span class="nav-label">音乐系统</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a target="/toWebconPage/task_realmusic">实时音乐</a>
                        </li>
                        <li>
                            <a target="/toWebconPage/task_timemusic">定时音乐</a>
                        </li>
                    </ul>
                </li>

                <!-- 音乐系统 -->
                <li>
                    <a>
                        <i class="fa fa-tasks"></i>
                        <span class="nav-label">定时采集</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a target="/toWebconPage/task_collection">定时采集</a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a>
                        <i class="fa fa-fire"></i>
                        <span class="nav-label">消防报警</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a target="/toWebconPage/task_fire">消防报警</a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a>
                        <i class="fa fa-random"></i>
                        <span class="nav-label">语音合成</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a target="/toWebconPage/task_voice">语音合成</a>
                        </li>
                    </ul>
                </li>

                <!--
                    TODO 实时寻呼
                -->
                <li>
                    <a>
                        <i class="fa fa-exchange"></i>
                        <span class="nav-label">实时寻呼</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a target="/toVideoPage/video_more">实时寻呼</a>
                        </li>
                        <li>
                            <a target="/toVideoPage/video_one">双向对讲</a>
                        </li>
                    </ul>
                </li>

                <!--<li class="active">
                    <a href="index.html">
                        <i class="fa fa-th-large"></i>
                        <span class="nav-label">Dashboards</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li class="active">
                            <a href="index.html">Dashboard v.1</a>
                        </li>
                        <li>
                            <a href="dashboard_2.html">Dashboard v.2</a>
                        </li>
                        <li>
                            <a href="dashboard_3.html">Dashboard v.3</a>
                        </li>
                        <li>
                            <a href="dashboard_4_1.html">Dashboard v.4</a>
                        </li>
                        <li>
                            <a href="dashboard_5.html">Dashboard v.5 <span class="label label-primary pull-right">NEW</span></a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="layouts.html"><i class="fa fa-diamond"></i> <span class="nav-label">Layouts</span></a>
                </li>-->
                <!-- 左侧菜单项 - end -->

            </ul>

        </div>
    </nav>

    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom myheader">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <!-- 缩放菜单按钮 -->
                    <a class="navbar-minimalize minimalize-styl-2 btn btn-primary ">
                        <i class="fa fa-bars"></i>
                    </a>
                    <!-- 搜索框
                    <form role="search" class="navbar-form-custom" action="search_results.html">
                        <div class="form-group">
                            <input type="text" placeholder="Search for something..." class="form-control" name="top-search" id="top-search">
                        </div>
                    </form> -->
                    <form role="search" class="navbar-form-custom" action="search_results.html">
                        <div class="form-group">
                            <span id="title_span" class="form-control" style="line-height: 45px">终端状态</span>
                            <!--<input type="text" class="form-control" name="top-search" id="top-search" value="终端状态" disabled="disabled">-->
                        </div>
                    </form>
                </div>
                <ul class="nav navbar-top-links navbar-right">
                    <li>
                        <span class="m-r-sm text-muted welcome-message">Welcome to Audio and Video System</span>
                    </li>

                    <li>
                        <a th:href="${#request.getContextPath() + '/webcon/logout'}">
                            <i class="fa fa-sign-out"></i> 注销
                        </a>
                    </li>
                    <!--<li>
                        <a class="right-sidebar-toggle">
                            <i class="fa fa-tasks"></i>
                        </a>
                    </li>-->
                </ul>

            </nav>
        </div>
        <!-- 内容存放的区域 -->
        <div id="iframe"></div>

    </div>

</div>

</body>

</html>